package cn.ncupyh.comptest;

import java.util.Scanner;

//输出乘法口诀表
public class PrintMultiplicationTable {
    public static void main(String[] args) {
        //法一:
//        int sum =0;
//        for (int i = 1; i <= 9; i++) {
//            System.out.print(i + "sum = ");
//            for (int j = 1; j <= i; j++) {
//                sum = i*j;
//                System.out.print(" "+j+"*"+i+"="+sum);
//            }
//            System.out.println("");
//        }

        //法二:
        Scanner s = new Scanner(System.in);
        int input = s.nextInt();
        for (int i = 1; i <= input; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(i+"*"+j+"="+i*j);
                System.out.print(" ");
            }
            System.out.println();
        }

    }
}
